package com.fengniu.ejb.dao;

import java.io.Serializable;
import java.util.List;

import com.fengniu.ejb.entity.CouponItem;

public interface ICouponDao extends Serializable {
	/**
	 * 
	 * @param userSysId
	 * @param storeSysId
	 * @param store2CouponRelationIds
	 * @param couponSysId
	 * @param couponTypeIds,
	 * @param couponIssueId
	 * @param pgno
	 * @param pgsize
	 * @return
	 */
	public List<CouponItem> getListCouponItem(long userSysId, long storeSysId, Integer[] store2CouponRelationIds,
			long couponSysId, Integer[] couponTypeIds, long couponIssueId, int pgno, int pgsize);

	/**
	 * 
	 * @param userSysId
	 * @param storeSysId
	 * @param store2CouponRelationIds
	 * @param couponSysId
	 * @param couponTypeIds,
	 * @param couponIssueId
	 * @return
	 */
	public Long getCountCouponItem(long userSysId, long storeSysId, Integer[] store2CouponRelationIds,
			long couponSysId, Integer[] couponTypeIds, long couponIssueId);

	public CouponItem saveCouponItem(CouponItem couponItem);

	public CouponItem findCouponItemByItemId(String couponItemId);

	public CouponItem findCouponItemBySysId(long couponItemSysId);

	/**
	 * update lottery number of coupon item
	 * 
	 * @param couponItem
	 * @return updated record number
	 */
	public int updateCouponItemLotteryNumbers(CouponItem couponItem);
}
